home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
mkutil21.zip
/
MAKEDEFS
/
BC32.MK
< prev
next >
Wrap
Text File
|
1995-02-06
|
5KB
|
153 lines
#############################################################################
#
# Copyright (C) 1994 SciTech Software
# All rights reserved.
#
# Descripton: Generic DMAKE startup makefile definitions file. Assumes
# that the SCITECH environment variable has been set to point
# to where all our stuff is installed. You should not need
# to change anything in this file.
#
# Borland C++ 4.0 32 bit version. Supports Borland's DOS Power
# Pack DPMI32 DOS extender and Phar Lap's TNT DOS Extender.
#
# $Id: bc32.mk 1.1 1995/02/06 12:49:39 kjb release $
#
#############################################################################
# Disable warnings for macros redefined here that were given
# on the command line.
__.SILENT := $(.SILENT)
.SILENT := yes
# File suffix definitions
L := .lib # Libraries
E := .exe # Executables
O := .obj # Objects
A := .asm # Assembler sources
P := .cpp # C++ sources
# Import enivornment variables that we use
TMPDIR := $(ROOTDIR)/tmp
.IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA
.IMPORT .IGNORE : USE_TNT USE_WIN32 FPU
# We use the MSDOS shell at all times
SHELL := $(COMSPEC)
GROUPSHELL := $(SHELL)
SHELLFLAGS := $(SWITCHAR)c
GROUPFLAGS := $(SHELLFLAGS)
SHELLMETAS := *"?<>
GROUPSUFFIX := .bat
DIRSEPSTR := \\
DIVFILE = $(TMPFILE:s,/,\)
# Default commands for compiling, assembling linking and archiving
CC := bcc32 # C-compiler and flags
CFLAGS := -4 -H=bcc32.sym -D__MSDOS__
AS := tasm # Assembler and flags
ASFLAGS := /mx /m /D__FLAT__ /i$(SCITECH)\INCLUDE
LD := bcc32 # Loader and flags
LDFLAGS = $(CFLAGS)
LIB := tlib # Librarian
LIBFLAGS := /C
# Optionally turn on debugging information
.IF $(DBG)
CFLAGS += -v # Turn on debugging for C compiler
LIBFLAGS += /P128 # Larger page size for libraries with debug info!
ASFLAGS += /zi # Turn on debugging for assembler
.END
# Optionally turn on optimisations
.IF $(OPT)
CFLAGS += -4 -O2
.END
# Optionally turn on direct i387 FPU instructions
.IF $(FPU)
CFLAGS += -DFPU387
ASFLAGS += -DFPU387
.END
# Optionally compile a shareware version of a product
.IF $(SHW)
LIB_DIR := LIBSW
CFLAGS += -DSHAREWARE
.ELSE
LIB_DIR := LIB
.END
# Optionally compile a beta release version of a product
.IF $(BETA)
CFLAGS += -DBETA
ASFLAGS += -DBETA
.END
# Optionally use Phar Lap's TNT DOS Extender, otherwise use the DOS Power Pack
.IF $(USE_TNT)
DX_CFLAGS += -DTNT
DX_ASFLAGS += -DTNT
.ELIF $(USE_WIN32)
USE_WIN32 := 1
DX_CFLAGS += -WX -DWINDPMI32
DX_ASFLAGS += -DWINDPMI32
.ELSE
USE_DPMI32 := 1
DX_CFLAGS += -WX -DDPMI32
DX_ASFLAGS += -DDPMI32
.END
# Place to look for PMODE library files
.IF $(MK_PMODE)
.ELIF $(USE_TNT)
PMLIB := tnt\pmode.lib
.ELIF $(USE_WIN32)
PMLIB := win32\pmode.lib
.ELSE
PMLIB := dpmi32\pmode.lib
.END
# Define where to install library files
LIB_BASE := $(SCITECH)\$(LIB_DIR)\BC32
LIB_DEST := $(LIB_BASE)
# Definition of $(MAKE) macro for recursive makes.
MAKE = $(MAKECMD) $(MFLAGS)
# Macro to install a library file
INSTALL := cp
# Implicit generation rules for making object files
%$O: %.c ; +$(CC) @$(mktmp $(CFLAGS)) -c $<
%$O: %$P ; +$(CC) @$(mktmp $(CFLAGS)) -c $<
%$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
# Implicit rule for building a library file using response file
%$L: ; $(LIB) $(LIBFLAGS) $@ @$(mktmp -+$(?:t" &\n-+")\n)
# Implicit rule for building an executable file using response file
.IF $(USE_TNT)
%$E: ;
@[
@cp $(mktmp stub 'gotnt.exe') $*.def
$(LD) @$(mktmp $(LDFLAGS) -e$@ $(&:s/\/\\) $(PMLIB) $(EXELIBS) dosx32.lib)
@rm $*.def
]
.ELSE
%$E: ; +$(LD) @$(mktmp $(LDFLAGS) -e$@ $(&:s/\/\\) $(PMLIB) $(EXELIBS))
.END
# DMAKE uses this recipe to remove intermediate targets
.REMOVE :; $(RM) -f $<
# Turn warnings back to previous setting.
.SILENT := $(__.SILENT)
# We dont use TABS in our makefiles
.NOTABS := yes